package com.ygy.jxc.dao;

import com.ygy.jxc.dto.ShopAndSaleAndStockAndPurchaseDto;
import com.ygy.jxc.model.CkmdStock;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CkStockDao {

  /**
   * 增加库存
   * @param quantity
   * @param shopName
   * @param depositoryName
   * @return
   */
  int  addQuantityByTwoName(@Param("quantity") Long quantity ,@Param("shopName") String shopName, @Param("depositoryName") String depositoryName);


  /**
   * 减少库存
   * @param quantity
   * @param shopName
   * @param depositoryName
   * @return
   */
  int  reduceQuantityByTwoName(@Param("quantity") Long quantity ,@Param("shopName") String shopName, @Param("depositoryName") String depositoryName);


  /**
   * 获取库存
   * @param shopName
   * @param depositoryName
   * @return
   */
  List<CkmdStock> getStockByTwoName(String shopName, String depositoryName);

  List<ShopAndSaleAndStockAndPurchaseDto> getNumberToShopAndStockAndPurchase();
}
